javascript replace spaces with one space

45

javascript replace spaces with one space -

string = string.replace(/\s\s+/g, ' ');

Comments

Submit
0 Comments